package com.cardvalue.sys.dialog;

import android.content.Context;
import android.content.DialogInterface;
import android.view.View;
import com.cardvalue.sys.dialog.CustomDialog.Builder;
/**
 * 仿ios的dialog
 * Created by cardvalue on 2016/4/14.
 */
public class IosDailog {

    public static void CustomAlert(String title,String msg,Context context,DialogInterface.OnClickListener ok,DialogInterface.OnClickListener cancel){
        CustomDialog.Builder builder = new  Builder(context);
        builder.setMessage(msg);
        builder.setTitle("提示");
        builder.setPositiveButton("确认", ok);
        builder.setNegativeButton("取消",cancel);
        builder.create().show();

    }



    public static void BasiListDialog(String title,String msg,Context context,DialogInterface.OnClickListener ok,DialogInterface.OnClickListener cancel){
        CustomDialog.Builder builder = new  Builder(context);
        builder.setMessage(msg);
        builder.setPositiveButton("有POS机", ok);
        builder.setNegativeButton("无POS机",cancel);
        builder.create().show();

    }




    public static void BasiListDialog1(String title, String msg, Context context, DialogInterface.OnClickListener ok, DialogInterface.OnClickListener cancel){
        CustomDialog.Builder builder = new  Builder(context);
        builder.setMessage(msg);
        builder.setTitle("提示");
        builder.setNegativeButton("我知道了",cancel);
        builder.create().show();

    }


    public static void EditAlert(String title, View layout, Context context, DialogInterface.OnClickListener ok, DialogInterface.OnClickListener cancel){
        CustomDialog.Builder builder = new  Builder(context);
        builder.setContentView(layout);
        builder.setTitle("请输手机入验证码");
        builder.setPositiveButton("确认", ok);
        builder.setNegativeButton("取消",cancel);
        builder.create().show();
    }




    public static void CustomAlert1(String title,String msg,Context context,Boolean cancelbtn,DialogInterface.OnClickListener ok,DialogInterface.OnClickListener cancel){
        CustomDialog.Builder builder = new  Builder(context);
        builder.setMessage(msg);
        builder.setTitle("提示");
        builder.setPositiveButton("确认", ok);
        builder.setNegativeButton("取消",cancel);
        builder.create().show();
    }
}
